package com.example.aiagent.tools;

import com.example.aiagent.constant.AiDocumentReader;
import jakarta.annotation.Resource;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;

import java.io.IOException;

public class DocumentOperationTool {


    @Tool(description = "Read content from a office document")
    public String readOfficeDocument(@ToolParam(description = "Name of the document to read") String fileName) throws IOException {
        AiDocumentReader aiDocumentReader = new AiDocumentReader();
        return aiDocumentReader.readFile(fileName);
    }
}
